class Parent{
      constructor(name){

          this.name='Tom'
      }
      getName(){          
          
        return this.name            //
      }
}
class Child extends Parent{
      constructor(name){
        super(name)
        this.age=20
      }
}

let p =new Parent('Tom') 
let c =new Child ('Jerry')       //super子类传父类  
console.log(p)